home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NAFCOM Cost Model 1999
/
NAFCOM Cost Model 99.iso
/
nafcom99
/
SETUP.RUL
< prev
next >
Wrap
Text File
|
2000-01-12
|
4KB
|
129 lines
// Sample Script
// This is the InstallSHIELD installation script described above:
// Corrections to InstallSHIELD 2.0 Sample Script found in the User's Guide
// on Pages 82-83
// InstallSHIELD Script file for My Program
// Copyright 1993 Stirling Technologies, Inc.
declare
#define SPACE_NEEDED 3000000
string szText [ 255 ], szTemp [255];
number nSpace, nTemp;
string szDisk [ 3 ], szDefPath [255 ];
string szBitmapPath [ 255 ];
string szBitmapPath2 [ 255 ];
string szBitmapPath3 [ 255 ];
string szBitmapPath4 [ 255 ];
string szResultPath [ 255 ];
string szProgramPath [ 255 ];
string szHelpPath [ 255 ];
string szWorkingPath [ 255 ];
string szReadme [ 255 ];
string szNotePad [ 255 ];
program
anyword:
SetColor( STATUSBAR, RED );
SetColor( BACKGROUND, BK_BLUE );
SetFont( FONT_TITLE, STYLE_BOLD, "Times New Roman" );
Enable( BITMAPFADE );
Enable( EXIT );
Disable ( HELP );
//Enable ( PAUSE );
//Enable ( INFO );
Enable ( FEEDBACK_FULL );
Enable ( STATUS );
Enable ( INDVFILESTATUS );
Enable ( BACKGROUND );
// TARGETDIR = "c:\\WINDOWS" ;
GetDisk( TARGETDIR, szDisk );
// szDisk = "c:"
szDefPath = szDisk ^ "NAFCOM99";
szBitmapPath = SRCDIR;
szBitmapPath = szBitmapPath ^ "NAFCOM.BMP" ;
PlaceBitmap( szBitmapPath, 103, CENTERED, 10, UPPER_LEFT );
// SetInfoWindow( "Information", "file1.lis" );
// SetStatusWindow( 10, "Installing NAFCOM 99" );
TargetLocation:
AskPath( "Where do you want to install NAFCOM 99?",
szDefPath, szResultPath);
if LAST_RESULT = FALSE then call
ConfirmCancel;
endif;
if szResultPath = SRCDIR then
MessageBox ( "You entered the source directory path...",
SEVERE );
goto TargetLocation;
endif;
CreateDir( szResultPath );
if LAST_RESULT = 0 then goto DirCreated; endif;
MessageBox( "Unable to create directory. Please enter a valid path",
SEVERE );
goto TargetLocation;
DirCreated:
GetDiskSpace( szResultPath );
if LAST_RESULT < SPACE_NEEDED then
MessageBox ( "Not enough space on the drive.Try another.", SEVERE );
goto TargetLocation;
endif;
SetStatusWindow( 0, "Ready to copy files." );
TARGETDIR = szResultPath;
szBitmapPath2 = SRCDIR;
szBitmapPath2 = szBitmapPath2 ^ "NASA.BMP" ;
PlaceBitmap( szBitmapPath2, 101, 10, 10, LOWER_RIGHT );
szBitmapPath3 = SRCDIR;
szBitmapPath3 = szBitmapPath3 ^ "USAF.BMP" ;
PlaceBitmap( szBitmapPath3, 103, 10, 10, LOWER_LEFT );
szBitmapPath4 = SRCDIR;
szBitmapPath4 = szBitmapPath4 ^ "SAIC.BMP" ;
PlaceBitmap( szBitmapPath4, 102, CENTERED, 50, UPPER_RIGHT );
SetStatusWindow( 0, "Copying NAFCOM99 Files...." );
StatusUpdate( 1, 97);
CompressGet( "NAFCOM.Z", "*.*", COMP_NORMAL );
SetStatusWindow( 99, "Finished copying files." );
StatusUpdate(OFF, 0);
StatusUpdate( 1, 100 );
szProgramPath = TARGETDIR ^ "NAFCOM99.EXE";
szWorkingPath = TARGETDIR ;
AddProgItemEx( "NAFCOM 99",
"NASA/Air Force Cost Model 99",
szProgramPath,
szWorkingPath,
"",
0,
"",
RUN_MINIMIZED | REPLACE );
SetStatusWindow(100, "Finished Creating Program Group.");
MessageBox("Installation is complete.", INFORMATION );
exit;
ConfirmCancel:
AskYesNo ( "Are you sure want to cancel this installation", NO );
if LAST_RESULT = NO then return; endif;
exit;